%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/mutation-create.single-hardcoded"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 20, 21, 2, 52, 4, 56<br /><br />1: PgInsertSingle[17]<br />2: <br />ᐳ: Object[22]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 17, 2, 52, 22, 4, 56<br /><br />ROOT Object{1}ᐸ{result}ᐳ[22]<br />1: <br />ᐳ: 23, 26, 28, 29, 53, 25, 30<br />2: PgSelect[27]<br />ᐳ: Access[49]<br />3: Connection[32], Connection[43]<br />4: 34, 45<br />ᐳ: 33, 44, 50, 51, 54, 55, 37, 48"):::bucket
    Bucket5("Bucket 5 (nullableBoundary)<br />Deps: 37, 54, 17, 56, 50<br /><br />ROOT Edge{2}[37]"):::bucket
    Bucket6("Bucket 6 (nullableBoundary)<br />Deps: 48, 55, 17, 56, 51<br /><br />ROOT Edge{2}[48]"):::bucket
    Bucket7("Bucket 7 (nullableBoundary)<br />Parent side effect step: 17<br />Deps: 4, 53<br /><br />ROOT __ValueᐸrootValueᐳ[4]"):::bucket
    Bucket8("Bucket 8 (nullableBoundary)<br />Deps: 54, 17, 56<br /><br />ROOT PgSelectSingle{2}ᐸpersonᐳ[54]"):::bucket
    Bucket9("Bucket 9 (nullableBoundary)<br />Deps: 55, 17, 56<br /><br />ROOT PgSelectSingle{2}ᐸpersonᐳ[55]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket5 & Bucket6 & Bucket7
    Bucket5 --> Bucket8
    Bucket6 --> Bucket9

    %% plan dependencies
    __InputObject8{{"__InputObject[8∈0] ➊<br />More deps:<br />- Constantᐸ9000ᐳ[65]<br />- Constantᐸ'John Smith Jr.'ᐳ[66]<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ'Son of Sara and John Smith.'ᐳ[67]<br />- Constantᐸ'johnny.boy.smith@email.com'ᐳ[68]<br />- Constantᐸ'172.16.1.2'ᐳ[69]<br />- Constantᐸ'172.16.0.0/12'ᐳ[70]<br />- Constantᐸ'00:00:00:00:00:00'ᐳ[71]"}}:::plan
    __InputDynamicScalar13{{"__InputDynamicScalar[13∈0] ➊"}}:::plan
    __InputDynamicScalar13 --> __InputObject8
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]"}}:::plan
    __InputObject8 --> __InputObject6
    Object20{{"Object[20∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access18{{"Access[18∈0] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access19{{"Access[19∈0] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access18 & Access19 --> Object20
    ApplyInput21{{"ApplyInput[21∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput21
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ<br />Dependents: 4"]:::plan
    PgInsertSingle17[["PgInsertSingle[17∈1] ➊<br />ᐸperson()ᐳ"]]:::sideeffectplan
    Object20 & ApplyInput21 --> PgInsertSingle17
    Object22{{"Object[22∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgInsertSingle17 --> Object22
    PgSelect27[["PgSelect[27∈2] ➊<br />ᐸpersonᐳ"]]:::plan
    Object30{{"Object[30∈2] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    PgClassExpression25{{"PgClassExpression[25∈2] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    Object30 & PgClassExpression25 --> PgSelect27
    Access28{{"Access[28∈2] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access29{{"Access[29∈2] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access28 & Access29 --> Object30
    Edge37{{"Edge[37∈2] ➊"}}:::plan
    First33{{"First[33∈2] ➊"}}:::plan
    PgCursor50{{"PgCursor[50∈2] ➊"}}:::plan
    First33 & PgCursor50 --> Edge37
    Edge48{{"Edge[48∈2] ➊"}}:::plan
    First44{{"First[44∈2] ➊"}}:::plan
    PgCursor51{{"PgCursor[51∈2] ➊"}}:::plan
    First44 & PgCursor51 --> Edge48
    Access49{{"Access[49∈2] ➊<br />ᐸ27.cursorDetailsᐳ"}}:::plan
    First33 & Access49 --> PgCursor50
    First44 & Access49 --> PgCursor51
    Access23{{"Access[23∈2] ➊<br />ᐸ17.m.clientMutationIdᐳ"}}:::plan
    Object22 o--o Access23
    Access26{{"Access[26∈2] ➊<br />ᐸ17.tᐳ"}}:::plan
    Access26 --> PgClassExpression25
    PgInsertSingle17 --> Access26
    Connection32[["Connection[32∈2] ➊<br />ᐸ27ᐳ"]]:::plan
    PgSelect27 --> Connection32
    ConnectionItems34[["ConnectionItems[34∈2] ➊"]]:::plan
    ConnectionItems34 --> First33
    Connection32 --> ConnectionItems34
    Connection43[["Connection[43∈2] ➊<br />ᐸ27ᐳ"]]:::plan
    PgSelect27 --> Connection43
    ConnectionItems45[["ConnectionItems[45∈2] ➊"]]:::plan
    ConnectionItems45 --> First44
    Connection43 --> ConnectionItems45
    PgSelect27 --> Access49
    Lambda53{{"Lambda[53∈2] ➊<br />ᐸrawEncodeᐳ<br />More deps:<br />- Constantᐸ'query'ᐳ[52]"}}:::plan
    PgSelectSingle54{{"PgSelectSingle[54∈2] ➊<br />ᐸpersonᐳ"}}:::plan
    First33 --> PgSelectSingle54
    PgSelectSingle55{{"PgSelectSingle[55∈2] ➊<br />ᐸpersonᐳ"}}:::plan
    First44 --> PgSelectSingle55
    List58{{"List[58∈8] ➊<br />ᐸ56,57ᐳ<br />More deps:<br />- Constantᐸ'people'ᐳ[56]"}}:::plan
    PgClassExpression57{{"PgClassExpression[57∈8] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgClassExpression57 --> List58
    PgSelectSingle54 --> PgClassExpression57
    Lambda59{{"Lambda[59∈8] ➊<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List58 --> Lambda59
    PgClassExpression63{{"PgClassExpression[63∈8] ➊<br />ᐸ__person__...full_name”ᐳ"}}:::plan
    PgSelectSingle54 --> PgClassExpression63
    List61{{"List[61∈9] ➊<br />ᐸ56,60ᐳ<br />More deps:<br />- Constantᐸ'people'ᐳ[56]"}}:::plan
    PgClassExpression60{{"PgClassExpression[60∈9] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgClassExpression60 --> List61
    PgSelectSingle55 --> PgClassExpression60
    Lambda62{{"Lambda[62∈9] ➊<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List61 --> Lambda62
    PgClassExpression64{{"PgClassExpression[64∈9] ➊<br />ᐸ__person__...full_name”ᐳ"}}:::plan
    PgSelectSingle55 --> PgClassExpression64

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,__InputObject8,__InputDynamicScalar13,Access18,Access19,Object20,ApplyInput21 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgInsertSingle17,Object22 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,Access23,PgClassExpression25,Access26,PgSelect27,Access28,Access29,Object30,Connection32,First33,ConnectionItems34,Edge37,Connection43,First44,ConnectionItems45,Edge48,Access49,PgCursor50,PgCursor51,Lambda53,PgSelectSingle54,PgSelectSingle55 bucket2
    classDef bucket5 stroke:#7fff00
    class Bucket5 bucket5
    classDef bucket6 stroke:#ff1493
    class Bucket6 bucket6
    classDef bucket7 stroke:#808000
    class Bucket7 bucket7
    classDef bucket8 stroke:#dda0dd
    class Bucket8,PgClassExpression57,List58,Lambda59,PgClassExpression63 bucket8
    classDef bucket9 stroke:#ff0000
    class Bucket9,PgClassExpression60,List61,Lambda62,PgClassExpression64 bucket9

    %% implicit side effects
    PgInsertSingle17 -.-o Access28
    PgInsertSingle17 -.-o Access29
    PgInsertSingle17 -.-o Lambda53

